package com.search.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

@Service
@Scope("prototype")
@Slf4j
public class Add2Service {

    int num = 0;

    public int add() throws InterruptedException {
        log.info(Thread.currentThread().getName()+"service");
        do{
            num++;
            //Thread.sleep(100);
        }while (num<50);

       return num;
    }
}
